import request from '@/utils/request'

// 查询应用激活码管理列表
export function listAppAccount(query) {
  return request({
    url: '/deviceBox/appAccount/list',
    method: 'get',
    params: query
  })
}

// 查询应用激活码管理详细
export function getAppAccount(id) {
  return request({
    url: '/deviceBox/appAccount/' + id,
    method: 'get'
  })
}

// 新增应用激活码管理
export function addAppAccount(data) {
  return request({
    url: '/deviceBox/appAccount',
    method: 'post',
    data: data
  })
}

// 修改应用激活码管理
export function updateAppAccount(data) {
  return request({
    url: '/deviceBox/appAccount',
    method: 'put',
    data: data
  })
}

// 删除应用激活码管理
export function delAppAccount(id) {
  return request({
    url: '/deviceBox/appAccount/' + id,
    method: 'delete'
  })
}

// 导入激活码
export function importAppAccount(formData) {
  return request({
    url: '/deviceBox/appAccount/import',
    method: 'post',
    data: formData,
    headers: { 'Content-Type': 'multipart/form-data' }
  });
}
